<template>
  <div class="noHaveData_area">
    <div class="noHaveData" />
    <div class="tips">请先前往：基础设置——币种管理，添加所需币种</div>
    <el-button type="primary" class="btn" @click="goTo">前往</el-button>
  </div>
</template>

<script>
export default {
  name: 'NotFoundData',
  props: {
    index: {
      type: String,
      default: ''
    }
  },
  // 方法集合
  methods: {
    goTo() {
      if (this.index) {
        this.$emit('redirect', this.index)
      } else {
        this.$router.push({ path: '/basic-settings', query: { index: 'CoinManagement' }})
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.noHaveData_area{
  .noHaveData{
    width: 438px;
    height: 350px;
    background: url('../../assets/notHaveData.png');
    background-size: 100%;
    margin: 120px auto 0 auto;
  }
  .tips{
    margin-top: 50px;
    text-align: center;
    height: 18px;
    font-size: 18px;
    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
    font-weight: 500;
    color: #000000;
    line-height: 18px;
  }
  .btn{
    width: 100px;
    height: 40px;
    border-radius: 6px;
    display: block;
    margin: 50px auto 0 auto;
  }
}
</style>
